无效访问，<span id="secondsleft"></span>秒后自动返回主页...

<script type="text/javascript">
	secondsleft = 3;

    countdown = function(secondsleft)
    {
    	console.log(secondsleft);

    	$('#secondsleft').text(secondsleft);

    	setTimeout(function(){
    		if(--secondsleft > 0)
    		{
    			countdown(secondsleft);
    		}
    		else
    		{
    			window.location.href = "./index.html";
    		}
    	}, 1000);
    }
    countdown(secondsleft);
</script>